This invention relates to the fields of computer systems and communications. More particularly, a method and apparatus are provided for managing receipt of communication traffic.
In many computing environments, communications are segmented and conveyed as packets, frames, cells or other units. Depending on the size of the original communication, it may result in the transmission of many packets. To reconstitute the communication, a recipient must allocate and control sufficient resources to adequately manage the receipt and reassemble each packet in its correct position.
Traditionally, a hardware device (e.g., a Network Interface Card or NIC) receives packets from a communication link. The device places the packets in shared buffers and passes them to a host processor or other module for processing in accordance with their corresponding protocols. Only at this stage of handling could the ultimate destination of a packet (e.g., an application) be determined. In particular, the host would parse the packet's headers, identify and retrieve a packet payload and copy that payload to an appropriate storage location.
The short period of time available to the hardware device for processing a packet, coupled with its lack of knowledge of the destination or status of the corresponding communication connection, prevented the hardware device from being able to forward the packet directly to its destination. Typically, only the processor applying a packet's protocol stack had access to the information needed to correctly direct the packet.
Thus, after a packet is received from a communication link, it is traditionally buffered at the receiving device for some initial processing (e.g., to compute a checksum, identify the communication connection corresponding to the packet). Then it is copied to a host processor for further processing, after which it is copied again to its destination application or other consumer.
Each time the packet is copied or buffered, additional resources are consumed, the packet is further delayed and the efficiency of the overall process declines. Management of the buffers adds yet more overhead to the process. And, as data rates of networks and other communication links continue to increase, host processors are forced to process more and more packets, and it is possible that congestion may occur if they must continue to handle every packet.
One attempted solution to the need for efficient management of incoming packet traffic involves moving protocol processing to the receiving device (e.g., a NIC). However, this makes it harder to update protocol processing procedures, and, some packets may still need to be handled by a processor (e.g., because of error conditions). Also, packet payloads still need to be handled multiple times (e.g., by the receiving device and a host processor) before being passed to their ultimate destinations.
Thus, an apparatus and method are needed for reducing the amount of processing necessary to separate a packet payload from its headers and pass the payload to its destination.